On Functors Expressible in the Polymorphic Typed Lambda Calculus

نویسندگان

  • John C. Reynolds
  • Gordon D. Plotkin
چکیده

Given a model of the polymorphic typed lambda calculus based upon a Cartesian closed category K, there will be functors from K to K whose action on objects can be expressed by type expressions and whose action on morphisms can be expressed by ordinary expressions. We show that if T is such a functor then there is a weak initial T -algebra and if, in addition, K possesses equalizers of all subsets of its morphism sets, then there is an initial T -algebra. These results are used to establish the impossibility of certain models, including those in which types denote sets and S → S′ denotes the set of all functions from S to S′. ∗Research supported by the Institut National de Recherche en Informatique et en Automatique, and by NSF Grants MCS-8017577, CCR-8620191, and CCR-8922109. The research was also supported in part by DARPA (DOD), monitored by the Avionics Laboratory, Air Force Wright Aeronautical Laboratories, Aeronautical Systems Division (AFSC), Wright-Patterson AFB, Ohio 45433-6543 under Contract F3361587-C-1499, ARPA Order No. 4976, Amendment 20. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of any agency of the US Government. †Research supported by the British Petroleum Venture Research Group. 1 The polymorphic, or second-order, typed lambda calculus [11, 9, 30] is an extension of the typed lambda calculus in which polymorphic functions can be defined by abstraction on type variables, and such functions can be applied to type expressions. It is known that all expressions of this language are normalizable [11, 9], indeed strongly normalizable [27]. It is also known that the elements of any free many-sorted anarchic algebra are isomorphic to the closed normal expressions of a type that is determined by the signature of the algebra [17, 5]. (This result was anticipated in [33, Proposition 3.15.18].) These facts led to the conjecture in [31] that the polymorphic typed lambda calculus should possess a “set-theoretic” model in which types denote sets and S → S′ denotes the set of all functions from S to S′. However, Reynolds [28] later showed that no such model exists. Shortly thereafter, Plotkin [26] generalized this proof by considering, for models based upon arbitrary Cartesian closed categories, the behavior of functors that can be defined in the calculus. In this joint paper, we give an exposition of this generalization, and show why it precludes the existence of several kinds of model. The authors wish to thank one of the referees for a suggestion that led us to generalize the concept of a definable functor by permitting type variables to denote arbitrary objects. (What in previous versions of this paper were called “expressible” functors are functors definable from an empty list of objects.) This generalization has simplified our arguments and allowed us to strengthen our impossibility results. 1. Mathematical Preliminaries When f is a function, we write dom f for the domain of f , feS for the restriction of f to S ⊆ dom f , and fx (often without parentheses) for the application of f to an argument x. We assume that application is left-associative, so that fx y = (fx)y. We write [ f | x: x′ ] to denote the function with domain dom f ∪{x} such that [ f | x: x′ ]y = if y = x then x′ else fy, and also [ x1: y1 | . . . | xn: yn ] (where the xi’s are distinct) to denote the function with domain {x1, . . . , xn} that maps each xi into yi. As a special case, [ ] denotes the empty function. We also write 〈y1, y2〉 for the pair [ 1: y1 | 2: y2 ]. When K is a category, we write |K| for the collection of objects of K, k −→K k ′ for the set of morphisms from k ∈ |K| to k′ ∈ |K|, α ;K α′ for the composition (in diagrammatic order) of α ∈ k −→K k ′ with α′ ∈ k′ −→K k ′′, and IK k for the identity morphism in k −→K k. (In these and later notations, we will frequently elide subscripts or superscripts denoting categories or other entities that are evident from context.) We also write Kop for the dual of K. Let F be a function from some (finite) set domF to |K|. Then a (finite) product of F in K consists of an object ∏KF and, for each v ∈ dom F , a morphism PK[F, v] ∈ ∏KF → Fv, such that, if k ∈ |K| and Γ is a function with the same domain as F that maps each v ∈ dom F into a morphism in k → Fv, then there is a unique morphism, denoted by 〈

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Database Query Languages Embedded in the Typed Lambda Calculus

We investigate the expressive power of the typed-calculus when expressing computations over nite structures, i.e., databases. We show that the simply typed-calculus can express various database query languages such as the relational algebra, xpoint logic, and the complex object algebra. In our embeddings, inputs and outputs are-terms encoding databases, and a program expressing a query is a-ter...

متن کامل

Type Checking and Inference for Polymorphic and Existential Types

This paper proves undecidability of type checking and type inference problems in some variants of typed lambda calculi with polymorphic and existential types. First, type inference in the domain-free polymorphic lambda calculus is proved to be undecidable, and then it is proved that type inference is undecidable in the negation, conjunction, and existence fragment of the domain-free typed lambd...

متن کامل

Region Analysis and the Polymorphic Lambda Calculus

We show how to translate the region calculus of Tofte and Talpin, a typed lambda calculus that can statically delimit the lifetimes of objects, into an extension of the polymorphic lambda calculus called F#. We give a denotational semantics of F#, and use it to give a simple and abstract proof of the correctness of memory deallocation.

متن کامل

MPhil in Advanced Computer Science Advanced

SYLLABUS A range of topics for the course follows. 1. Algebraic theories: universal algebra; equational logic; soundness and completeness; theory translations and constructions. 2. Algebras: initial algebras; induction principle; recursive domain equations; free algebras. 3. Presheaves: cartesian closure; essential geometric morphisms; free cocompletions; Kan extensions; coends. 4. Simply typed...

متن کامل

Semantic and Syntactic Approaches to Simulation Relations

Simulation relations are tools for establishing the correctness of data refinement steps. In the simply-typed lambda calculus, logical relations are the standard choice for simulation relations, but they suffer from certain shortcomings; these are resolved by use of the weaker notion of pre-logical relations instead. Developed from a syntactic setting, abstraction barrier-observing simulation r...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Inf. Comput.

دوره 105  شماره 

صفحات  -

تاریخ انتشار 1993